<?
class Page extends Base{
    var $table = 'page';
    var $id_field = 'pag_id';
    var $name_field = 'pag_title';
    var $picture_field = 'pag_image';
    var $page_type;
    var $result = array();
    public function __construct($alias){
        $this->result = db_first('SELECT pag_id,pag_title,pag_alias,pag_image,pag_summary,pag_detail,pag_active 
                                  FROM page
                                  WHERE pag_active = 1 AND pag_alias = "'.$alias.'"
                                  LIMIT 1');
        $this->name = $this->result['pag_title'];
        $this->description = $this->result['pag_summary'];
        $this->url = DOMAIN.$this->result['pag_alias'];
        $this->picture = DOMAIN.$this->result['pag_image'];
        parent::__construct($this->result['pag_id']);
    }
}
?>